package ua.dogar.threads;

import ua.dogar.vectors.Vector;



public class VectorWriterThread extends Thread {
	Vector vec;
	
	public VectorWriterThread(Vector vec) {
		this.vec = vec;
	}

	@Override
	public  void run() {
		for(int i =0;i<vec.getLength();i++){
			double genValue = Math.round(Math.random()*100);
			vec.setElement(genValue, i);
			System.out.println("Write:"+genValue+" to position "+i);
		}
	}
}
